<div class="easyui-layout plugins" data-options="fit:true" ui="sales_saleInit"  id="${id}" rightId ="${rightId}" rights = '${rights}' reportRights = '${reportRights}'>
	<div data-options="region:'north',border:false"  class="queryContent" id="queryContent_${id}">
		消费日期：&nbsp;&nbsp;<input name="beginDate" id="beginDateSearch" type="text" class="queryInput Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 140px"/>
		--<input name="endDate" id="endDateSearch" type="text" class="queryInput Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" style="width: 140px"/>&nbsp;&nbsp;&nbsp;
		会员名称：&nbsp;&nbsp;<input name="customerName" id="customerNameSearch" type="text" class="queryInput"/>
		<a href="javascript:void(0)" class="easyui-linkbutton" id="searchBtn_${id}" data-options="iconCls:'icon-search'" style="cursor: pointer;">查 询</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" id="clearBtn_${id}" data-options="iconCls:'icon-clear'" style="cursor: pointer;">清空</a>
	</div>
	<div data-options="region:'center',border:false">
		<div id="viewList_${id}"></div>
	</div>
	
	<div id="tb_${id}">
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" id="addSale_${id}" >添加</a>  
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" id="update_${id}" >修改</a>  
		<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" id="delete_${id}" >删除</a>  
	</div>
	
	<div id="editDialog_${id}">
		<div class="easyui-layout" data-options="fit:true">
				<div data-options="region:'north',border:false" style="height:170px;">
					<form method="post" name="editForm" id="editForm_${id}">
						<input type="hidden" name="saleId" id="saleId" />
						<div class="easyui-panel" title="会员信息" style="height:65px;" >  
						   <table border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td class="tdTitle">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;会员：</td>
									<td class="tdContent">
										<input type="hidden" name="customerId" id="customerId" />
										<input type="hidden" name="payType" id="payType"/>
										<input type="text"  id="customerName" name="customerName" style="width: 172px" disabled="disabled"/>
										<a href="javascript:void(0)" class="easyui-linkbutton" id="customerAddBtn_${id}" data-options="iconCls:'icon-add',plain:true">选择会员</a>
									</td>
									<td class="tdTitle">会员卡余额：</td>
									<td class="tdContent">
										<input type="text" name="customerAmount" id="customerAmount"  class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
									</td>
								</tr>
							</table>  
						</div> 
						<div class="easyui-panel" title="消费" style="height:100px;"  data-options="border:false">
							<table border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td class="tdTitle tdRequired">消费日期：</td>
									<td class="tdContent">
										<input type="text" name="saleDate" id="saleDate"  class="contentInput Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/>
									</td>
									<td class="tdTitle tdRequired">录入人：</td>
									<td class="tdContent">
										<input type="hidden" name="userId" id="userId"/>
										<input type="text" id="userName" name="userName"  class="contentInput inputBorderNone" readonly="readonly"/>
									</td>
								</tr>
								<tr>
									<td class="tdTitle tdRequired">不打折金额：</td>
									<td class="tdContent">
										<input type="text" name="notIntoDiscountAmount" id="notIntoDiscountAmount"   class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
									</td>
									<td class="tdTitle tdRequired">打折金额：</td>
									<td class="tdContent">
										<input type="text" name="intoDiscountAmount" id="intoDiscountAmount"   class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
									</td>
								</tr>
								<tr>
									<td class="tdTitle">折扣：</td>
									<td class="tdContent">
										<input type="text" name="discount" id="discount"  class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
									</td>
									<td class="tdTitle tdRequired">消费金额：</td>
									<td class="tdContent">
										<input type="text" name="amount" id="amount"  class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
									</td>
								</tr>
							</table>
						</div>
						<input type="hidden" name="saleItemDetailIds" id="saleItemDetailIds"/>
						<input type="hidden" name="saleItemIds" id="saleItemIds"/>
						<input type="hidden" name="amounts" id="amounts"/>
						<input type="hidden" name="isDiscounts" id="isDiscounts"/>
						<input type="hidden" name="userIds" id="userIds"/>
						<input type="hidden" name="delSaleItemDetailIds" id="delSaleItemDetailIds"/>
						
						<input type="hidden" name="saleGoodsDetailIds" id="saleGoodsDetailIds"/>
						<input type="hidden" name="goodsIds" id="goodsIds"/>
						<input type="hidden" name="amountsGoods" id="amountsGoods"/>
						<input type="hidden" name="isDiscountsGoods" id="isDiscountsGoods"/>
						<input type="hidden" name="userIdsGoods" id="userIdsGoods"/>
						<input type="hidden" name="delSaleGoodsDetailIds" id="delSaleGoodsDetailIds"/>
			    	</form>
    			</div>
    			<div data-options="region:'center',border:false">
					<div id="saleTabs_${id}" class="easyui-tabs"  data-options="fit:true,border:false" >
						<div title="消费项目">
							<div id="saleItemDetailList_${id}" data-options="border:false"></div>
						</div>
						<div title="消费产品">
							<div id="saleGoodsDetailList_${id}" data-options="border:false"></div>
						</div>
					</div>
				</div>
			</div>
	</div>
	<div id="customerDialog_${id}">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'north',border:false" class="queryContent">
				会员号：&nbsp;&nbsp;<input id="customerCodeSearch" type="text" class="queryInput"/>&nbsp;&nbsp;&nbsp;
				会员名称：&nbsp;&nbsp;<input id="customerNameSearch" type="text" class="queryInput"/>&nbsp;&nbsp;&nbsp;
				<a href="javascript:void(0)" class="easyui-linkbutton" id="searchCustomerBtn_${id}" data-options="iconCls:'icon-search'" style="cursor: pointer;">查 询</a>
			</div>
			<div data-options="region:'center',border:false">
				<div id="customerList_${id}"></div>
			</div>
		</div>
	</div>
	<div id="saleItemDialog_${id}">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'north',border:false" class="queryContent">
				消费项目名称：&nbsp;&nbsp;<input id="saleItemNameSearch" type="text" class="queryInput"/>&nbsp;&nbsp;&nbsp;
				<a href="javascript:void(0)" class="easyui-linkbutton" id="searchSaleItemBtn_${id}" data-options="iconCls:'icon-search'" style="cursor: pointer;">查 询</a>
			</div>
			<div data-options="region:'center',border:false">
				<div id="saleItemList_${id}"></div>
			</div>
		</div>
	</div>
	<div id="goodsDialog_${id}">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'north',border:false" class="queryContent">
				产品名称：&nbsp;&nbsp;<input id="goodsNameSearch" type="text" class="queryInput"/>&nbsp;&nbsp;&nbsp;
				<a href="javascript:void(0)" class="easyui-linkbutton" id="searchGoodsBtn_${id}" data-options="iconCls:'icon-search'" style="cursor: pointer;">查 询</a>
			</div>
			<div data-options="region:'center',border:false">
				<div id="goodsList_${id}"></div>
			</div>
		</div>
	</div>
	<!-- 余额不足界面 -->
	<div id="amountLessDialog_${id}">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'north',border:false" style="height:75px;">
				<div class="easyui-panel" title="消费信息" data-options="border:false,fit:true"> 
					<table border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td class="tdTitle">会员：</td>
							<td class="tdContent">
								<input type="text"  id="customerName" name="customerName" class=" inputBorderNone" readonly="readonly"/>
							</td>
							<td class="tdTitle">会员卡余额：</td>
							<td class="tdContent">
								<input type="text" name="customerAmount" id="customerAmount"  class=" easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
							</td>
						</tr>
						<tr>
							<td class="tdTitle">消费金额：</td>
							<td class="tdContent">
								<input type="text" name="amount" id="amount"  class=" easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
							</td>
							<td class="tdTitle">不足金额：</td>
							<td class="tdContent">
								<input type="text" name="lessAmount" id="lessAmount"  class=" easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
							</td>
						</tr>
					</table>
				</div>
			</div>
			<div data-options="region:'center',border:false,title:'付款方式'">
				<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td class="tdContent">
						1.&nbsp;&nbsp;<a href="javascript:void(0)" class="easyui-linkbutton" id="unitPayBtn_${id}" data-options="iconCls:'icon-search'" style="cursor: pointer;">联合结账</a>&nbsp;&nbsp;使用联合结账：会员卡付款<span id="customerAmountLabel"></span>元，现金付款<span id="lessAmountLabel"></span>元
						<br><br>
						2.&nbsp;&nbsp;<a href="javascript:void(0)" class="easyui-linkbutton" id="rechargePayBtn_${id}" data-options="iconCls:'icon-search'" style="cursor: pointer;">充值结账</a>&nbsp;&nbsp;会员卡充值后自动结账
						<br><br>
						3.&nbsp;&nbsp;<a href="javascript:void(0)" class="easyui-linkbutton" id="exitAmountLessDialogBtn_${id}" data-options="iconCls:'icon-exit'" style="cursor: pointer;">取消结账</a>&nbsp;&nbsp;退出余额不足界面
					</td>
				</tr>
				</table>
			</div>
		</div>
	</div>
	<!-- 充值界面 -->
	<div id="rechargeDialog_${id}">
		<form method="post" name="editForm" id="rechargeForm_${id}">
			<table border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td class="tdTitle">会员：</td>
					<td class="tdContent">
						<input type="hidden" name="customerId" id="customerId" />
						<input type="text"  id="customerName" class="contentInput inputBorderNone" readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<td class="tdTitle">会员卡余额：</td>
					<td class="tdContent">
						<input type="text" id="customerAmount"  class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<td class="tdTitle">消费金额：</td>
					<td class="tdContent">
						<input type="text" id="amountSale"  class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<td class="tdTitle">不足金额：</td>
					<td class="tdContent">
						<input type="text" id="lessAmount"  class="contentInput easyui-numberbox inputBorderNone" data-options="min:0,precision:2" readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<td class="tdTitle tdRequired">充值金额：</td>
					<td class="tdContent">
						<input type="text" name="amount" id="amount"  class="contentInput easyui-numberbox" data-options="min:0,precision:2"/>
					</td>
				</tr>
			</table>
		</form>
	</div>
	
</div>
